﻿using Microsoft.TeamFoundation.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pyramid.VsOnline.Core.Model
{
    public class TfsParameters
    {
        public string ServerUrl { get; set; }
        public TfsClientCredentials Credentials { get; set; }
        public bool IsGetHistory { get; set; }
        public bool IsWorkfold { get; set; }
        public bool IsWorkspaces { get; set; }
        public bool IsGetLatestVersion { get; set; }
        public bool IsCreateWorkspace { get; set; }
        public bool Silent { get; set; }
        public string LoginName { get; set; }
        public WorkspacesParameters Workspaces { get; set; }
        public WorkspaceCreateParameters WorkspaceCreate { get; set; }
        public WorkfoldParameters Workfold { get; set; }
        public LatestVersionParameters LatestVersion { get; set; }
        public HistoryParameters History { get; set; }
    }

    public enum WorkspaceFormatType
    {
        Brief,
        Detailed
    }

    public class WorkspacesParameters
    {
        public WorkspaceFormatType Format { get; set; }
        public string WorkspaceName { get; set; }
        public string Owner { get; set; }
        public string Computer { get; set; }
    }
    public class WorkspaceCreateParameters
    {
        public string WorkspaceName { get; set; }
        public string Owner { get; set; }
        public string Computer { get; set; }
    }
    public class WorkfoldParameters
    {
        public string ServerProjectPath { get; set; }
        public string TargetPath { get; set; }
        public string Workspace { get; set; }
        public string Owner { get; set; }
    }
    public class LatestVersionParameters
    {
        public string TargetPath { get; set; }
        public string ServerProjectPath { get; set; }
        public bool IsRecursive { get; set; }
        public DateTime? VersionFrom { get; set; }
        public DateTime? VersionTo { get; set; }
    }
    public class HistoryParameters
    {
        public string ServerProjectPath { get; set; }
        public bool IsRecursive { get; set; }
        public WorkspaceFormatType Format { get; set; }
        public DateTime? VersionFrom { get; set; }
        public DateTime? VersionTo { get; set; }
    }
}
